package com.atguigu.springcloud.Factory.test;

import com.atguigu.springcloud.Factory.Implementation1Factory;
import com.atguigu.springcloud.Factory.Implementation2Factory;
import com.atguigu.springcloud.Factory.ServiceFactory;
import com.atguigu.springcloud.Factory.service.TestService;

/**
 * @Author: Fanw
 * @Date: 2021/5/16 21:30
 * @Description:
 */
public class Factories {
    public static  void serviceConsumer(ServiceFactory fact){
        TestService service = fact.getService();
        service.method1();
        service.method2();
    }

    public static void main(String[] args) {
        serviceConsumer(new Implementation1Factory());
        serviceConsumer(new Implementation2Factory());
    }
}
